package com.ruoyi.applet.service.impl;

import java.time.LocalDateTime;
import java.util.List;

import com.ruoyi.applet.domain.vo.SpikesGoods;
import com.ruoyi.applet.domain.vo.SpikesOrder;
import com.ruoyi.applet.domain.vo.SpikesTime;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.applet.mapper.SpikesMapper;
import com.ruoyi.applet.domain.Spikes;
import com.ruoyi.applet.service.ISpikesService;

import javax.annotation.Resource;

/**
 * 秒杀活动Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-14
 */
@Service
public class SpikesServiceImpl implements ISpikesService
{
    @Resource
    private SpikesMapper spikesMapper;


    @Override
    public List<SpikesOrder> selectAllByGoodsIdSpikesGoodsList() {
        return spikesMapper.selectAllByGoodsIdSpikesGoodsList();
    }

    @Override
    public List<SpikesOrder> selectBySpikesIdList(Long productId) {
        return spikesMapper.selectBySpikesIdList(productId);
    }

    @Override
    public List<SpikesOrder> selectByProductIdList(Long productId) {
        return spikesMapper.selectByProductIdList(productId);
    }

    @Override
    public List<SpikesTime> selectAllByCreateTimeSpikesList(LocalDateTime now) {
        return spikesMapper.selectAllByCreateTimeSpikesList(now);
    }

    @Override
    public Integer insertAllInteger(Long usrId, String orderId, String orderTotal, String orderReceiverName, String orderReceiverPhone, String orderReceiverAddress, Long orderGoodsId, Long orderNumber, String orderTransactionId,Long spikesInfoId) {
        return spikesMapper.insertAllInteger(usrId, orderId, orderTotal, orderReceiverName, orderReceiverPhone, orderReceiverAddress, orderGoodsId, orderNumber, orderTransactionId,spikesInfoId);
    }
}
